Holds information and allow control over a namespace in a scripting environment.
More...
Holds information and allow control over a namespace in a scripting environment.
◆ Namespace()
nkScripts::Namespace::Namespace |
( |
const char * |
name | ) |
|
◆ ~Namespace()
virtual nkScripts::Namespace::~Namespace |
( |
| ) |
|
|
virtual |
◆ getName()
const char* nkScripts::Namespace::getName |
( |
| ) |
const |
- Returns
- The namespace name.
◆ getNamespace()
virtual Namespace* nkScripts::Namespace::getNamespace |
( |
const char * |
name | ) |
const |
|
pure virtual |
- Parameters
-
name | The name of the sub namespace to retrieve. |
- Returns
- The sub namespace if available, nullptr else.
◆ getUserType()
virtual UserType* nkScripts::Namespace::getUserType |
( |
const char * |
name | ) |
const |
|
pure virtual |
- Parameters
-
name | The name of the user type to retrieve. |
- Returns
- The user type defined in the namespace if available, nullptr else.
◆ setVar()
virtual void nkScripts::Namespace::setVar |
( |
const char * |
name, |
|
|
int |
value |
|
) |
| |
|
pure virtual |
Sets a variable within the namespace.
- Parameters
-
name | The name of the variable to set. |
value | The value it should have. |
◆ setObject()
virtual void nkScripts::Namespace::setObject |
( |
const char * |
name, |
|
|
const char * |
userTypeName, |
|
|
void * |
value |
|
) |
| |
|
pure virtual |
Sets an object within the namespace.
- Parameters
-
name | The name of the object to set. |
userTypeName | The user type name identifying the type of the object to set. |
value | The user data pointer to attach. |
◆ setNamespace()
virtual Namespace* nkScripts::Namespace::setNamespace |
( |
const char * |
name | ) |
|
|
pure virtual |
Sets a sub namespace.
- Parameters
-
name | The name of the sub namespace to set. |
- Returns
- The newly created namespace. External code does not own it, it should not delete it.
◆ setUserType()
virtual UserType* nkScripts::Namespace::setUserType |
( |
const char * |
name | ) |
|
|
pure virtual |
Sets a user type.
- Parameters
-
name | The name of the type to set. |
- Returns
- The newly created user type. External code does not own it, it should not delete it.
◆ setFunc()
virtual Function* nkScripts::Namespace::setFunc |
( |
const char * |
name | ) |
|
|
pure virtual |
Sets a function.
- Parameters
-
name | The name of the sub namespace to set. |
- Returns
- The newly created function. External code does not own it, it should not delete it.
◆ shutdown()
virtual void nkScripts::Namespace::shutdown |
( |
| ) |
|
|
pure virtual |
Prepares the namespace for shutdown. In theory, should never be called by external code.
◆ reset()
virtual void nkScripts::Namespace::reset |
( |
| ) |
|
|
pure virtual |
Resets the namespace, to free all sub namespaces, functions, user types set on it.
The documentation for this class was generated from the following file:
- Documentation/Headers/NilkinsScripts/Environments/Namespaces/Namespace.h